import {RouteRecordRaw} from "vue-router"

export const menus = [
        {
            path: '/index',
            name: 'index',
            component: () => import('./modules/index.vue'),
            meta: {
                title: '首页'
            }
        },
        {
            path: '/information',
            name: 'information',
            component: () => import('./modules/information.vue'),
            meta: {
                title: '旅游资讯'
            }
        },
        {
            path: '/routeTon',
            name: 'routeTon',
            component: () => import('./modules/routeTon.vue'),
            meta: {
                title: '旅游路线'
            }
        },
        {
            path: '/come',
            name: 'come',
            component: () => import('./modules/come.vue'),
            meta: {
                title: '热门景点'
            }
        },
        {
            path: '/raccoon',
            name: 'raccoon',
            component: () => import('./modules/raccoon.vue'),
            meta: {
                title: '我的收藏'
            }
        }
    ]
;

export const children: any = [
    {
        path: '/information-details',
        name: 'information-details',
        component:()=>import('./modules/information-details.vue'),
        meta: {title: '资讯详情'}
    },
    {
        path: '/routeTon-details',
        name: 'routeTon-details',
        component:()=>import('./modules/routeTon-details.vue'),
        meta: {title: '路线详情'}
    },
    {
        path: '/come-details',
        name: 'come-details',
        component:()=>import('./modules/come-details.vue'),
        meta: {title: '景点详情'}
    },
    {
        path: '/jdtt',
        name: 'jdtt',
        component:()=>import('./modules/jdtt.vue'),
        meta: {title: '景点地图'}
    },

    {
        path: '/userInfo',
        name: 'userInfo',
        component:()=>import('./modules/userInfo.vue'),
        meta: {title: '个人中心'}
    }
]
for (let i = 0; i < menus.length; i++) {
    children.push(menus[i])
}

const routes: RouteRecordRaw[] = [
    {
        path: '/login',
        name: 'login',
        component: () => import('./modules/login.vue'),
        meta: {
            title: '登录',
            isShow: false
        }
    },
    {
        path: '/',
        component: () => import('./modules/layout.vue'),
        children: children
    }
]
export default routes
